package com.example.text.service;


import com.example.text.entity.Inware;
import com.example.text.entity.Outware;
import com.example.text.entity.Result;
import com.example.text.mapper.OutWareMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OutWareService {

    @Autowired
    OutWareMapper outWareMapper;

    public List<Outware> selectAllOrder() {
        return  outWareMapper.selectAllOrder();
    }

    public Outware selectByOrder(String outWareOrder) {
        return  outWareMapper.selectByOrder(outWareOrder);
    }

    public void deleteOrder(Integer outWareId) {
        outWareMapper.deleteOrder(outWareId);

    }

    public Result insertWare(Outware outware) {
        outWareMapper.insert(outware);

        return Result.success();

    }
}
